/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.commands.DriveWithJoystick;

/**
 *
 * @author zanish
 */
public class Chassis extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.

    RobotDrive drive;
    
    public void initDefaultCommand() {
        setDefaultCommand(new DriveWithJoystick());
    }
    
    public Chassis(){
        drive = new RobotDrive(9, 10);
        drive.setSafetyEnabled(false);
    }
    
    public void driveWithJoystick(Joystick stick){
        drive.arcadeDrive(stick);
    }
    
    public void setSpeed(double speed){
        drive.setMaxOutput(speed);
    }
}
